package com.regex;

import java.util.Arrays;

public class Split {

	public static void main(String[] args) {
		String s = "Then, when you have found the shrubbery, you must cut down the mightiest tree in the forest... with... a herring!";
		System.out.println(Arrays.toString(s.split(" ")));
		// \\W非字母，\\w字母
		System.out.println(Arrays.toString(s.split("\\W+")));
		System.out.println(Arrays.toString(s.split("n\\W+")));
	}

}
